package com.globant.profy.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;

import javax.persistence.Table;



@Entity
@Table(name = "users")
@NamedQueries({
@NamedQuery(name="User.byEmail", query="from User u where u.email = :email")})


public class User {

private String name;
private String company;
private String jobTitle;
private String email;
private int id;
private String experience;
// private String username;
// private String passwd;
private String langSpoken;
private String permission;

public User() {
}

public User(String email, String permission) {
this.email = email;
this.permission = permission;
}



public User(String name, String company, String jobTitle, String email,
String experience, String langSpoken) {
this.name = name;
this.company = company;
this.jobTitle = jobTitle;
this.email = email;
this.experience = experience;
this.langSpoken = langSpoken;
}

@Column(name = "user_permission")
public String getPermission() {
return permission;
}

public void setPermission(String permission) {
this.permission = permission;
}

@Column(name = "user_name")
public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

@Column(name = "user_company")
public String getCompany() {
return company;
}

public void setCompany(String company) {
this.company = company;
}

@Column(name = "user_jobTitle")
public String getJobTitle() {
return jobTitle;
}

public void setJobTitle(String jobTitle) {
this.jobTitle = jobTitle;
}

@Column(name = "user_email")
public String getEmail() {
return email;
}

public void setEmail(String email) {
this.email = email;
}

@Id
@GeneratedValue
@Column(name = "user_id")
public int getId() {
return id;
}

public void setId(int id) {
this.id = id;
}

@Column(name = "user_experience")
public String getExperience() {
return experience;
}

public void setExperience(String experience) {
this.experience = experience;
}

@Column(name = "user_languages")
public String getLangSpoken() {
return langSpoken;
}

public void setLangSpoken(String langSpoken) {
this.langSpoken = langSpoken;
}

@Override
public String toString() {
return "User [name=" + name + "]";
}

}
